<template>
  <!-- 企业信息
  1:定义接口api
  2:导入调用api
  3:渲染数据
 -->
  <el-form label-width="120px">
    <el-form-item label="企业名称">
      <el-input disabled v-model="info.name"></el-input>
    </el-form-item>
    <el-form-item label="公司地址">
      <el-input disabled v-model="info.companyAddress"></el-input>
    </el-form-item>
    <el-form-item label="公司电话">
      <el-input disabled v-model="info.companyPhone"></el-input>
    </el-form-item>
    <el-form-item label="邮箱">
      <el-input disabled v-model="info.mailbox"></el-input>
    </el-form-item>
    <el-form-item label="备注">
      <el-input disabled v-model="info.remarks"></el-input>
    </el-form-item>
  </el-form>
</template>
<script>
import { companyGet } from '@/api/settings'
import { mapState } from 'vuex'
export default {
  computed: {
    ...mapState('user', ['userInfo'])
  },
  data () {
    return {
      info: ''
    }
  },
  async created () {
    this.info = await companyGet(this.userInfo.companyId)
    window.console.log('公司信息', this.info)
  }
}
</script>
<style></style>
